package com.itzdm.client.client;

import com.itzdm.client.config.DefaultFeignConfig;
import com.itzdm.client.domain.po.Message;
import com.itzdm.client.fallback.UserFallback;
import com.itzdm.client.fallback.WsFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @作者：张德明
 * @时间：2025/4/16 20:54
 */
@FeignClient(value = "websocket-service",fallback = WsFallback.class, configuration = DefaultFeignConfig.class)
public interface WsClient {

    @PostMapping("/websocket/send")
    void sendMsg(@RequestParam("userId") Long userId, @RequestBody Message message);

    @PostMapping("/websocket/sendMessage")
    void sendMessage(@RequestParam("friendId") Long friendId, @RequestParam("message") String message);
}
